package com.dj.dal;

import com.dj.domain.entity.JobsUserProfile;

/**
 * 类UserProfileDao.java的实现描述：TODO 类实现描述
 * 
 * @author jasen.hsu.cn@gmail.com 2012-4-18 下午1:58:27
 */
public class UserProfileDao extends BaseDao<JobsUserProfile> {

    public UserProfileDao(){
        this.namespace = "jobs.single.jobsUserProfile";
    }

    /**
     * 根据用户ID取得用户基础信息
     * 
     * @param uid
     * @return
     */
    public JobsUserProfile loadByUid(Long uid) {
        return (JobsUserProfile) sqlMapClientTemplate.queryForObject(namespace + "." + "loadByUid", uid);
    }

    /**
     * 根据用户ID取得用户基础信息,并加锁
     * 
     * @param uid
     * @return
     */
    public JobsUserProfile lockByUid(Long uid) {
        return (JobsUserProfile) sqlMapClientTemplate.queryForObject(namespace + "." + "lockByUid", uid);
    }

}
